# coding=utf-8
from functools import wraps


def mylog(func):
    @wraps(func)
    def infunc(*args, **kwargs):
        print("日志记录")
        print("函数文档：", func.__doc__)
        return func(*args, **kwargs)

    return infunc


@mylog    # 等价于 fun2 = mylog(fun2)
def fun2(a, b):
    """强大的功能2"""
    print("使用功能2:", a, b)


if __name__ == '__main__':
    fun2(100, 200)
    print("函数文档--->", fun2.__doc__)
